package longcaisuyun.longcai.com.yiliubabalongcaisuyun;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import java.util.List;

import longcaisuyun.longcai.com.suyunbean.ShouFeiFJBean;


/**
 * Created by Administrator on 2016/2/22.
 */
public class ShoufeiAdapter extends BaseAdapter {
    Context   context;
    ViewHolder   vh;
    List<ShouFeiFJBean> list_fj;
    public  ShoufeiAdapter(Context   context, List<ShouFeiFJBean>list_fj){
        this.context=context;
        this.list_fj=list_fj;
    }
    public int getCount() {
        return list_fj.size();
    }

    @Override
    public Object getItem(int position) {
        return null;
    }

    @Override
    public long getItemId(int position) {
        return 0;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
       if(convertView==null){
           vh=new ViewHolder();
           convertView=View.inflate(context, R.layout.item_feiyong,null);
           MyApplication.ScaleScreenHelper.loadView((ViewGroup) convertView);
           vh.tv_1= (TextView) convertView.findViewById(R.id.t_if);
           vh.tv_2= (TextView) convertView.findViewById(R.id.t_jieguo);
           convertView.setTag(vh);
       }else{
           vh= (ViewHolder) convertView.getTag();
       }
        vh.tv_1.setText(list_fj.get(position).getTitle());
        vh.tv_2.setText(list_fj.get(position).getInfo());
        return convertView;
    }
    class ViewHolder{
        public TextView  tv_1;
        public TextView  tv_2;
    }
}
